<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use frontend\assets\AppAsset;

/* @var $this yii\web\View */

$this->title = 'A-PMS项目管理系统';

?>
<!--中心内容区-->
<div class="container content">
    <div class="row">
        <div class="content-left pull-left col-md-2">
            <div class="list-group ">
                <a href="#" class="list-group-item active">
                    <img src="images/image/officeHall/uploadAssetPackage/upload.png" class="pull-left"><span>上传基本信息</span>
                </a>
                <a href="#" class="list-group-item">
                    <img src="images/image/officeHall/uploadAssetPackage/new.png" class="pull-left"><span>我的新建记录</span></a>
            </div>
        </div>

        <div class="content-right pull-right">
            <div class="upLoadInformation">
                <span></span>
                <p>上传基本信息</p>
            </div>
            <div class="loadState">
                <img src="images/image/officeHall/uploadAssetPackage/loadState.png" alt=""/>
            </div>

            <?php $form = ActiveForm::begin([
                'action' => ['package/index'], //提交地址(*可省略*)
                'method' => 'post',    //提交方法(*可省略默认POST*)
                'id' => 'package-add', //设置ID属性
                'options' => [
                    'class' => 'myForm form-inline', //设置class属性
                    'enctype' => 'multipart/form-data' //文件上传时添加该编码
                ]
            ]); ?>

            <?= $form->field($model, 'title', [
                    'inputOptions' => ['placeholder' => '请输入资产包名称', 'autofocus'=>'autofocus', 'list'=>"assetPackageTitle", 'class' => 'form-control', 'id'=>'assetPackageName']]
            )->textInput(['maxlength' => 255, /*"style" => "width:200px; height:30px;"*/]) ?>
            <br/>

            <?= $form->field($model, 'type')->radioList(['0'=>'保证类','1'=>'抵押类','2'=>'保证类'])->label('资产类型') ?>
            <br/>

            <!--<div class="form-group">
                <label for="exampleInputEmail2">资产类型</label>
                <button type="button" name="Package[type]" value="0" class="btn btn-default">保证类</button>
                <button type="button" name="Package[type]" value="1" class="btn btn-default">抵押类</button>
                <button type="button" name="Package[type]" value="2" class="btn btn-default">保证类</button>
            </div>
            <br/>-->

            <div class="form-group jurisdiction">
                <span for="exampleInputEmail2">访问权限</span>
                <input type="radio" id="open" name="Package[access]" value="0"/>
                <label for="open"><span></span>公开</label>
<!--                <input type="radio" id="private" name="Package[access]" value="1"/>-->
<!--                <label for="private"><span></span>私密</label>-->
                <input type="radio" id="partialDisclosure" name="Package[access]" value="2" checked="checked"/>
                <label for="partialDisclosure" class="radioChecked"><span></span>部分公开</label>
            </div>
            <br/>

            <div class="form-group PublicSector">
                <label>公开部门</label>

                <input type="checkbox" name="Package[department][]" class="sector" id="project1" value="1"/>
                <label for="project1">项目一部</label>
                <br/>
                <div class="list_project1  sectorList">
                    <input type="checkbox" class="whole" name="Package[access_users][]"  value="0"/>
                    <label for="oneWhole2">全选</label>
                    <br/>
                    <label for="1">
                        <input type="checkbox" class="access_users" name="Package[access_users][]" value="1"/>王小五
                    </label>
                    <label for="12">
                        <input type="checkbox" class="access_users" name="Package[access_users][]"  value="12"/>王小五
                    </label>
                    <label for="13">
                        <input type="checkbox" class="access_users" name="Package[access_users][]"  value="13"/>王小五
                    </label>
                    <label for="14">
                        <input type="checkbox" class="access_users" name="Package[access_users][]"  value="14"/>王小五
                    </label>
                    <label for="15">
                        <input type="checkbox" class="access_users" name="Package[access_users][]"  value="15"/>王小五
                    </label>
                </div>


                <input type="checkbox" name="Package[department][]" class="sector" id="project2" value="2"/>
                <label for="project2">项目二部</label>
                <br/>
                <div class="list_project2 sectorList">
                    <input type="checkbox" class="whole" name="Package[access_users][]"  value="0"/>
                    <label for="twoWhole">全选</label>
                    <br/>
                    <label for="2">
                        <input type="checkbox" class="access_users" name="Package[access_users][]"  value="16"/>王小五
                    </label>
                    <label for="21">
                        <input type="checkbox" class="access_users" name="Package[access_users][]"  value="17"/>王小五
                    </label>
                </div>


                <input type="checkbox" name="Package[department][]" class="sector" id="project3" value="3"/>
                <label for="project3">项目三部</label>
                <br/>
                <div class="list_project3  sectorList">
                    <input type="checkbox" class="whole" name="Package[access_users][]"  value="0"/>
                    <label for="threeWhole">全选</label>
                    <br/>
                    <label for="3">
                        <input type="checkbox" class="access_users" name="Package[access_users][]" id="30" value="30"/>王小五
                    </label>
                    <label for="31">
                        <input type="checkbox" class="access_users" name="Package[access_users][]" id="31" value="31"/>王小五
                    </label>
                </div>

            </div>
            <br/>

            <div class="nextStep">
                <? echo Html::submitButton('提交', ['class' => 'btn btn-primary pu', 'name' => 'submit-button']) ?>
            </div>

            <?php ActiveForm::end() ?>
        </div>
    </div>
</div>

<?php
$js = <<<JS
$(function() {
    $('.myForm').show();
    //$('.importDebtorBox').hide();    
})
JS;
$this->registerJs($js);
